//
//  NetWorkTools.swift
//  DSWeibo
//
//  Created by J on 16/4/16.
//  Copyright © 2016年 J. All rights reserved.
//

import UIKit
import AFNetworking
class NetWorkTools: AFHTTPSessionManager {

    //常量代表只赋值一次 之后再也不能改变
    static let tools : NetWorkTools = {
        //一定要以/结尾
     let url = NSURL(string:"https://api.weibo.com/")
     let t =  NetWorkTools(baseURL:url)
        t.responseSerializer.acceptableContentTypes = (NSSet(objects: "application/json", "text/json", "text/javascript","text/plain") as! Set<String>)
        return t
    }()
    
    class func shareNetWorkTools()->NetWorkTools{
        return tools
    }
    
}
